#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>

struct node{
	double dist;
	double price;
}a[10];

using namespace std;

int main(){
	double d1,c,d2,p;
	int n;
	scanf("%lf%lf%lf%lf%d",&d1,&c,&d2,&p,&n);
	if(c==0){
		cout<<"No Solution"<<endl;
		return 0;
	}
	for(int i=1,i<=n,i++){
		scanf("%lf%lf",&a[i].dist,&a[i].price);
	}
	
	return 0;
}